package com.ruoyi.core.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.core.mapper.DeleteCodeMapper;
import com.ruoyi.core.domain.DeleteCode;
import com.ruoyi.core.service.IDeleteCodeService;
import com.ruoyi.common.core.text.Convert;

/**
 * 卡卷剔除Service业务层处理
 * 
 * @author lgc
 * @date 2020-08-11
 */
@Service
public class DeleteCodeServiceImpl implements IDeleteCodeService 
{
    @Autowired
    private DeleteCodeMapper deleteCodeMapper;

    /**
     * 查询卡卷剔除
     * 
     * @param deleteCodeId 卡卷剔除ID
     * @return 卡卷剔除
     */
    @Override
    public DeleteCode selectDeleteCodeById(Long deleteCodeId,Long userId)
    {
        return deleteCodeMapper.selectDeleteCodeById(deleteCodeId,userId);
    }

    /**
     * 查询卡卷剔除列表
     * 
     * @param deleteCode 卡卷剔除
     * @return 卡卷剔除
     */
    @Override
    public List<DeleteCode> selectDeleteCodeList(DeleteCode deleteCode)
    {
        return deleteCodeMapper.selectDeleteCodeList(deleteCode);
    }

    /**
     * 新增卡卷剔除
     * 
     * @param deleteCode 卡卷剔除
     * @return 结果
     */
    @Override
    public int insertDeleteCode(DeleteCode deleteCode)
    {
        return deleteCodeMapper.insertDeleteCode(deleteCode);
    }

    /**
     * 修改卡卷剔除
     * 
     * @param deleteCode 卡卷剔除
     * @return 结果
     */
    @Override
    public int updateDeleteCode(DeleteCode deleteCode)
    {
        return deleteCodeMapper.updateDeleteCode(deleteCode);
    }

    /**
     * 删除卡卷剔除对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteDeleteCodeByIds(String ids)
    {
        return deleteCodeMapper.deleteDeleteCodeByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除卡卷剔除信息
     * 
     * @param deleteCodeId 卡卷剔除ID
     * @return 结果
     */
    @Override
    public int deleteDeleteCodeById(Long deleteCodeId)
    {
        return deleteCodeMapper.deleteDeleteCodeById(deleteCodeId);
    }
}
